/**
 * 模型配置文件
 * 提供统一配置入口
 */

// 安全导入辅助函数
function safeRequire(path) {
  try {
    return require(path);
  } catch (error) {
    console.warn(`模块 ${path} 导入失败: ${error.message}`);
    return null;
  }
}

// 基础模型
const BaseModel = require('../../../framework/platform/model/base_model.js');
exports.base_model = BaseModel;

// 管理员模型
const AdminModel = safeRequire('../model/admin_model.js');
exports.admin_model = AdminModel;

// 日志模型
const LogModel = safeRequire('../model/log_model.js');
exports.log_model = LogModel;

// 用户模型
const UserModel = safeRequire('../model/user_model.js');
exports.user_model = UserModel;

// 项目模型
const ProjectModel = safeRequire('../model/project_model.js');
exports.project_model = ProjectModel;

// 消息模型
const MsgModel = safeRequire('../model/msg_model.js');
exports.msg_model = MsgModel;

// 流程模型
const FlowModel = safeRequire('../model/flow_model.js');
exports.flow_model = FlowModel;

// 新闻模型
const NewsModel = safeRequire('../model/news_model.js');
exports.news_model = NewsModel;

// 白名单模型
const WhiteModel = safeRequire('../model/white_model.js');
exports.white_model = WhiteModel;

// 收藏模型
const FavModel = safeRequire('../model/fav_model.js');
exports.fav_model = FavModel;

// 样品模型
const SampleModel = safeRequire('../model/sample_model.js');
exports.sample_model = SampleModel;

// 任务模型
const TaskModel = safeRequire('../model/task_model.js');
exports.task_model = TaskModel;

// 知识库模型
const KnowledgeModel = safeRequire('../model/knowledge_model.js');
exports.knowledge_model = KnowledgeModel;

// 测试模型
const TestModel = safeRequire('../model/test_model.js');
exports.test_model = TestModel;

// 研发项目模型
const ResearchProjectModel = safeRequire('../model/research_project_model.js');
exports.research_project_model = ResearchProjectModel;

// 研发项目分支模型
const ResearchBranchModel = safeRequire('../model/research_project_branch_model.js');
exports.research_project_branch_model = ResearchBranchModel;

// 研发项目版本模型
const ResearchVersionModel = safeRequire('../model/research_project_version_model.js');
exports.research_project_version_model = ResearchVersionModel;

// 研发项目资源模型
const ResourceModel = safeRequire('../model/research_project_resource_model.js');
exports.research_project_resource_model = ResourceModel;

// 项目基础模型
const BaseProjectModel = safeRequire('../model/base_project_model.js');
exports.base_project_model = BaseProjectModel;

// 部门模型
const DeptModel = safeRequire('../model/department_model.js');
exports.dept_model = DeptModel;

// 联系人模型
const ContactModel = safeRequire('../model/contact_model.js');
exports.contact_model = ContactModel;

// 客户模型
const CustomerModel = safeRequire('../model/customer_model.js');
exports.customer_model = CustomerModel;

// 事件模型
const EventModel = safeRequire('../model/event_model.js');
exports.event_model = EventModel;

// 反馈模型
const ProjectFeedbackModel = safeRequire('../model/project_feedback_model.js');
exports.project_feedback_model = ProjectFeedbackModel;

// 导出所有模型（排除null值）
module.exports = {
  BaseModel,
  AdminModel,
  LogModel,
  UserModel,
  ProjectModel,
  MsgModel,
  FlowModel,
  NewsModel,
  WhiteModel,
  FavModel,
  SampleModel,
  TaskModel,
  KnowledgeModel,
  TestModel,
  ResearchProjectModel,
  ResearchBranchModel,
  ResearchVersionModel,
  ResourceModel,
  BaseProjectModel,
  DeptModel,
  ContactModel,
  CustomerModel,
  EventModel,
  ProjectFeedbackModel
};